<script lang="ts" setup>
  import { ref } from 'vue';
  import Pagination from '@sscd/pagination';
  const current = ref<number>(1);
</script>

<template>
  <div class="demo">
    <div class="demo-title">上一步和下一步</div>
    <div class="demo-content">
      <Pagination v-model:current="current" :total="500">
        <template #itemRender="{ type, originalElement }">
          <a v-if="type === 'prev'">Previous</a>
          <a v-else-if="type === 'next'">Next</a>
          <component :is="originalElement" v-else></component>
        </template>
      </Pagination>
    </div>
  </div>
</template>
